<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
<title>角色添加页面</title>
<link href="<%=request.getContextPath()%>/css/Default.css"
	rel="stylesheet" type="text/css" />
	<link href="<%=request.getContextPath()%>/css/redmond/jquery-ui-1.8.14.custom.css"
	rel="stylesheet" type="text/css"></link>
<link href="<%=request.getContextPath()%>/css/Dialog.css"
	rel="stylesheet" type="text/css"></link>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="<%=request.getContextPath()%>/scripts/jquery-1.5.1.min.js"
	type="text/javascript"></script>
	<script src="<%=request.getContextPath()%>/scripts/HRM.js" type="text/javascript"></script>
<script
	src="<%=request.getContextPath()%>/scripts/jquery-ui-1.8.14.min.js"
	type="text/javascript"></script>
<script
	src="<%=request.getContextPath()%>/scripts/jquery.validate.min.js"
	type="text/javascript"></script>
<script
	src="<%=request.getContextPath()%>/scripts/jquery.validate.message_cn.js"
	type="text/javascript"></script>
<script
	src="<%=request.getContextPath()%>/scripts/Dialog.js"
	type="text/javascript"></script>
</head>
<body class="dialogBody">
<script type="text/javascript">
function beforeFormSubmitFunc(){
	if(!$("#roleAddForm").valid()){
		createAlertDialog('提示信息','还有未正确填写的项，请参照提示修改!');
		return false;
	}else{
		return true;
	}
}
$().ready(function(){
	$("#roleAddForm").validate({
		rules:{
			roleName:{
				required:true,
				maxlength:20
			},
			roleDesc:{
				maxlength:500
			}
		},
		errorPlacement:function(error,element){
			createTooltip(error,element);
		},
		success:function(error){
			sucRemoveTooltip(error);
		},
		event:'blur'|'keyup'|'focus'|'keydown'
	});
	$('#roleAddForm').find("input").focus(function(){
		$(this).valid();
	});
	$('#roleAddForm').find('#roleName').focus();
});
</script>

	<form id="roleAddForm" action='<%=request.getContextPath()%>/role.do?method=addRole' method="post">
		<table width="100%" height="" align="center" cellpadding="2"
			cellspacing="0">
			<tr>
				<td height="10"></td>
				<td></td>
			</tr>
			<tr>
				<td>
				<center>
					<fieldset>
						<legend>
							<label>角色信息</label>
						</legend>
						<table width="100%" border="0" cellpadding="0" cellspacing="0">
							<tr>
								<td height="30" align="right">角色名：</td>
								<td><input name="roleName" type="text" value=""
									id="roleName" /><span class='requiredSpan'>*</span></td>
							</tr>
							<tr>
								<td height="30" align="right" valign='top'>备注：</td>
								<td><textarea name="roleDesc" id="roleDesc"
										style="width: 118px; height: 60px;"></textarea></td>
							</tr>
						</table>
					</fieldset>
					</center>
				</td>
			</tr>
		</table>
	</form>

</body>
</html>